/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chameleon.model.NuGatStructure.enc;

import chameleon.gameSolver.NuGat.NuGatInterface;
import chameleon.model.NuGatStructure.NuGatStructure;
import chameleon.model.NuGatStructure.symbTable.SymbLayer;
import com.sun.jna.Pointer;

/**
 *
 * @author simon
 */
public class BaseEnc extends NuGatStructure {

    public BaseEnc(Pointer structure, NuGatInterface nugat) {
        super(structure, nugat);
    }
    
    /**Function********************************************************************

      Synopsis           [Call this method to enter a new layer. All variables 
      occurring in the layer, will be encoded as a result.]

      Description        [This method is virtual. The result of the encoding 
      depends on the actual instance (its actual class) it is invoked on.]

      SideEffects        []

      SeeAlso            []   

    ******************************************************************************/
    
    public void commitLayer(SymbLayer layer){
        nugat_.BaseEnc_commit_layer(this.ptr(), layer.getName());
    }
    
    /**Function********************************************************************

      Synopsis           [Call this method to remove an already committed layer.
      All variables occurring in the layer will be removed as a result. It will no
      longer allowed to use those variables within expressions encoded by self]

      Description        [This method is virtual. The result of the removal 
      depends on the actual instance (its actual class) it is invoked on.]

      SideEffects        []

      SeeAlso            []   

    ******************************************************************************/
    
    public void removeLayer(SymbLayer layer){
        //nugat_.BaseEnc_remove_layer(this.ptr(), layer.getName());
        nugat_.base_enc_remove_layer(this.ptr(), layer.getName());
    }
    
}
